package com.erp.erp_ui.money.enums;


/**
 * @ClassName : MoneyOperationStatusEnum
 * @Description : 付款类型枚举
 * @Author : lst
 * @Date: 2020-12-04 23:21
 */
public enum PaymentTypeEnum {

    REGISTRATION_SUBSIST(1, "登记预付款"),
    REGISTRATION_PAYMENT(2, "登记货款");

    /**
     * id
     */
    private int id;

    /**
     * 描述
     */
    private String desc;

    public int getId() {
        return id;
    }

    public String getDesc() {
        return desc;
    }

    PaymentTypeEnum(int id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    /**
     * 通过id获取描述信息
     * @param id
     * @return
     */
    public static String getDescById(Integer id){
        if(null == id){
            return "";
        }
        for(PaymentTypeEnum paymentTypeEnum : PaymentTypeEnum.values()){
            if(paymentTypeEnum.getId() == id){
                return paymentTypeEnum.getDesc();
            }
        }
        return "";
    }

}
